/apache

Set Authorization header in Apache 2.2

Set Authorization header in Apache 2.2

RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{QUERY_STRING} ^tocwidget=true&service=CSW&version=2.0.2&elementSetName=full&outputSchema=EBRIM&request=GetRecordById&id=(.*)$

RequestHeader set Authorization "Basic xxxxxxxxxxx"
RewriteRule ^/erdas-apollo/catalog/csw(.*)$ /erdas-apollo/catalog/csw?%{QUERY_STRING} [R,L]

To use environment variable:

RewriteCond %{REQUEST_METHOD} POST

RewriteCond %{QUERY_STRING} ^tocwidget=true&service=CSW&version=2.0.2&elementSetName=full&outputSchema=EBRIM&request=GetRecordById&id=(.*)$

SetEnvIfNoCase Request_URI "/erdas-apollo/catalog/csw" havedon

RequestHeader set Authorization "Basic xxxxxxxx" env=havedon

RewriteRule ^/erdas-apollo/catalog/csw(.*)$ /erdas-apollo/catalog/csw?%{QUERY_STRING} [R,L] 

Subscribe to Lydon's blog

Get the latest posts delivered right to your inbox

Lydon

Lydon

Grow and grow and grow

Read More